package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by oyhk on 16/3/4.
 * 分销市场 商家分销产品
 */
@Entity
@Table(name = "market_merchant_product")
@DynamicInsert
@DynamicUpdate
public class MarketMerchantProduct extends IDEntityMall {

    @Column(columnDefinition = "varchar(50) comment '产品id'")
    private Long productId;
    @Column(columnDefinition = "bigint comment '商户 id'")
    private Long merchantId;
    @Column(columnDefinition = "bigint comment '平台 id'")
    private Long mallId;
    @Column(columnDefinition = "bit comment '是否在分销市场展示'")
    private Boolean isRecommend;


    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Boolean getRecommend() {
        return isRecommend;
    }

    public void setRecommend(Boolean recommend) {
        isRecommend = recommend;
    }

    @Override
    public String toString() {
        return "MarketMerchantProduct{" +
                "productId=" + productId +
                ", id=" + id +
                ", merchantId=" + merchantId +
                ", mallId=" + mallId +
                ", dateCreated=" + dateCreated +
                ", isRecommend=" + isRecommend +
                ", lastUpdated=" + lastUpdated +
                ", isDelete=" + isDelete +
                ", version=" + version +
                '}';
    }
}
